﻿using Ebusiness_Application_Contracts.Iservice;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Localization;

namespace Ebusiness_Application.Service
{
    /// <summary>
    /// 语言服务 (获取所有定义的语言)
    /// </summary>
    [Dependency(ServiceLifetime.Transient)]
    public class LanguageServive : ILanguageServive, IRemoteService
    {
        public LanguageServive()
        {

        }

        public ILanguageProvider LanguageProvider { get; set; }

        public async Task<IReadOnlyList<LanguageInfo>> GetLanguageList() 
        {
            return await LanguageProvider.GetLanguagesAsync();
        }
    }
}
